﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Man adam = new Man(null, null, "Адам");
            Woman eva = new Woman(null, null, "Ева");
            Man vovan = new Man(adam, eva, "Вован");
            Woman kain = new Woman(adam, eva, "Каин");
            Man enot = new Man(vovan, kain, "Енот");
            Console.WriteLine(adam.Hello);
            Console.ReadLine();
        }
    }
    class Human
    {
        Man Father;
        Woman Mother;
        string age;
        string Firstname;
        string Lastname;
        List<Human> children = new List<Human>();

        public Human(Man father , Woman mother, string name)
        {
            Father = father;
            Mother = mother;
            name = Firstname;
        }
        public string Hello()
        {
            string result;
            result = String.Format("Привет! Меня зовут {0} {1}, мой возраст {2}, мои родители {3} и {4}", Firstname , Lastname , age, Father, Mother );
            if (Father == null)
            {
                result += "У меня нет отца";
            }
            else
            {
                result += "Мой отец - " + Father.Firstname;
            }

            if (Mother == null)
            {
                result += "У меня нет матери";
            }
            else
            {
                result +="Моя мать - " + Mother.Firstname;
            }
            return result;
        }

    }

    class Man : Human
    {
        public Man(Man father, Woman mother, string name) : base(father, mother, name)
        {

        }
    }

    class Woman : Human
    {
        public Woman(Man father, Woman mother, string name) : base(father, mother, name)
        {

        }
    }
 }
